from scrapy.http import Response
from scrapy.exceptions import IgnoreRequest

class CustomDownloaderMiddle(object):
    def process_request(self,request,spider):
        #print "=========This is downloadermiddleware request======="
        #raise IgnoreRequest("hehel")
        return None
    def process_response(self,request,response,spider):
        #print "=========This is downloadermiddleware response======"
        return response
    
    def process_exception(self,request,exception,spider):
        print exception
        return None